TEMPLATE = app

QT += qml quick sql quick quickcontrols2 widgets
CONFIG += c++17

include( $$PWD/MaterialUI/MaterialUI.pri )
include( $$PWD/qrcode/include/qrencode/qrencode.pri )
#include( $$PWD/qt-breakpad/qtcrashhandler.pri )
#include( $$PWD/qtcreatorcrashhandler/qtcreatorcrashhandler.pro )

LIBS *= -LC:\Users\kong\Application\02-Qt\06-QtSource\kong-build-qtcreator\lib\qtcreator -lUtils4

HEADERS += qtcreatorcrashhandler/crashhandlersetup.h
SOURCES += qtcreatorcrashhandler/crashhandlersetup.cpp

HEADERS += tcp/chatmanage.h \
    tcp/serverthread.h \
    tcp/socketsend.h \
    tcp/threadworker.h \
    tcp/threadforcurl.h \
    tcp/threadforloading.h \
    DataSourceObject.h \
    sqlcontactmodel.h \
    sqlconversationmodel.h \
    allsqlconversationmodel.h \
    qrcode/cpp/qrddencode.h \
    qrcode/cpp/barcode.h

SOURCES += main.cpp \
    tcp/chatmanage.cpp \
    tcp/serverthread.cpp \
    tcp/socketsend.cpp \
    tcp/threadworker.cpp \
    tcp/threadforloading.cpp \
    tcp/threadforcurl.cpp \
    sqlcontactmodel.cpp \
    sqlconversationmodel.cpp \
    allsqlconversationmodel.cpp \
    qrcode/cpp/qrddencode.cpp \
    qrcode/cpp/barcode.cpp

greaterThan(QT_MAJOR_VERSION, 4){
    SOURCES +=qrcode/cpp/quickitemgrabber.cpp
    HEADERS +=qrcode/cpp/quickitemgrabber.h
}

INCLUDEPATH += tcp \
             utils

RESOURCES += \
    qml.qrc \
    shared/shared.qrc

RC_FILE += shared/logo.rc

isEmpty(IDE_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    IDE_BUILD_TREE = $$clean_path($$OUT_PWD)
    IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}
IDE_BIN_PATH     = $$IDE_BUILD_TREE/bin
isEmpty(IDE_OUTPUT_PATH): IDE_OUTPUT_PATH = $$IDE_BUILD_TREE
win32: \
    IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/bin
else: \
    IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/libexec/qtcreator
RELATIVE_LIBEXEC_PATH = $$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BIN_PATH)
DEFINES += $$shell_quote(RELATIVE_LIBEXEC_PATH=\"$$RELATIVE_LIBEXEC_PATH\")
